package sample;

import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Hyperlink;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import javafx.stage.Stage;

public class Main4 extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) {

        Group group = new Group();

        Scene scene =new Scene(group,300,150);

        primaryStage.setScene(scene);
        primaryStage.setTitle("TextFiled Sample");

        GridPane pane = new GridPane();
        pane.setPadding(new Insets(10,10,10,10));
        pane.setVgap(5);
        pane.setHgap(5);


        scene.setRoot(pane);

        final TextField name = new TextField();
        name.setPromptText("Enter name");
        name.setPrefColumnCount(10);
        name.getText();
        //GridPane.setConstraints(name,0,0);

        Hyperlink link = new Hyperlink("www.baidu.com");


        pane.getChildren().addAll(link);

        primaryStage.show();

    }
}
